﻿using FangDuShi_Admin.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace FangDuShi_Admin.Controllers
{
     [OutputCache(Duration = 0, VaryByParam = "none")]
    public class AdminController : AdminBaseController
    {
        //
        // GET: /Admin/
        public ActionResult Index()
        {
            if (string.IsNullOrEmpty(OperateSession.get("UserName")))
            {
                ViewData["UserName"] = "";
            }
            else
            {
                ViewData["UserName"] = OperateSession.get("UserName");
            }
         ;
            return View();
        }

        public ActionResult Top()
        {
            return View();
        }

        public ActionResult Left()
        {
            return View();
        }

        /// <summary>
        /// 退出
        /// </summary>
        public void LogExit()
        {

            OperateSession.del(GlobalConstant.PARAM_USERNAME);
            OperateSession.del(GlobalConstant.PARAM_LOGINID);
            Session.Clear();
            Response.Redirect(Url.Action("Login", "Home"));
            Response.Flush();
            Response.End();
        }

	}
}